package com.qumitech.visualnovel.pubdef.dto.skill;

import com.qumitech.visualnovel.component.annotation.ExcelAnnotation;

/**
 * GodAdminExportDTO
 *
 * @author zhangbc
 * @version 1.0.0
 * @date 2020/8/25 15:23
 **/
public class GodAdminExportDTO {
    @ExcelAnnotation("用户ID")
    private String uid;
    private String presentId;
    @ExcelAnnotation("昵称")
    private String userName;
    @ExcelAnnotation("性别")
    private String sex;
    @ExcelAnnotation("接单状态")
    private String openFlag;
    @ExcelAnnotation("完成订单数")
    private Integer orderCount;
    @ExcelAnnotation("总收益")
    private String revenue;
    @ExcelAnnotation("姓名")
    private String realName;
    @ExcelAnnotation("身份证")
    private String idCard;
    @ExcelAnnotation("手机号")
    private String phoneNum;
    @ExcelAnnotation("认证时间")
    private String verifyTime;
    @ExcelAnnotation("大神状态")
    private String state;
    private String forbiddenState;
    @ExcelAnnotation("标签")
    private String label;
    @ExcelAnnotation("优质大神")
    private String topType;
    @ExcelAnnotation("禁止接单")
    private String forbidFlag;

    public String getForbiddenState() {
        return forbiddenState;
    }

    public void setForbiddenState(String forbiddenState) {
        this.forbiddenState = forbiddenState;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getPresentId() {
        return presentId;
    }

    public void setPresentId(String presentId) {
        this.presentId = presentId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        String flag = "0";
        if (flag.equals(sex)) {
            this.sex = "女";
        } else {
            this.sex = "男";
        }
    }

    public String getOpenFlag() {
        return openFlag;
    }

    public void setOpenFlag(String openFlag) {
        String flag = "1";
        if (flag.equals(openFlag)) {
            this.openFlag = "开启接单";
        } else {
            this.openFlag = "关闭接单";
        }
    }

    public String getForbidFlag() {
        return forbidFlag;
    }

    public void setForbidFlag(String forbidFlag) {
        // 0-不禁止 1-禁止  2-永久禁止
        switch (forbidFlag) {
            case "0":
                this.forbidFlag = "未禁止";
                break;
            case "1":
                this.forbidFlag = "已禁止";
                break;
            case "2":
                this.forbidFlag = "永久禁止";
                break;
            default:
                this.forbidFlag = "未定义";
                break;
        }
    }

    public String getRevenue() {
        return revenue;
    }

    public void setRevenue(String revenue) {
        if (revenue == null) {
            this.revenue = "0";
        } else {
            double rev = (double) Integer.valueOf(revenue) / 100;
            this.revenue = String.valueOf(rev);
        }
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getVerifyTime() {
        return verifyTime;
    }

    public void setVerifyTime(String verifyTime) {
        this.verifyTime = verifyTime;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        // 0-正常 1-禁止认证 2-永久禁止认证
        switch (state) {
            case "0":
                this.state = "已认证";
                break;
            case "1":
                this.state = "禁止认证";
                break;
            case "2":
                this.state = "永久禁止认证";
                break;
            default:
                this.state = "未知状态";
                break;
        }
    }

    public Integer getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(Integer orderCount) {
        this.orderCount = orderCount;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String toString() {
        return super.toString();
    }

    public String getTopType() {
        return topType;
    }

    public void setTopType(String topType) {
        String flag = "1";
        if (flag.equals(topType)) {
            this.topType = "是";
        } else {
            this.topType = "否";
        }
    }
}
